from pydantic import BaseModel
from typing import Optional

class Settings(BaseModel):
    # 数据库配置
    DATABASE_URL: str = "mysql+pymysql://root:123456@localhost:3307/personal_blog?charset=utf8mb4"
    
    # JWT配置
    SECRET_KEY: str = "shuzitansuokeji-personal-blog"  # 在生产环境中应该使用环境变量
    ALGORITHM: str = "HS256"
    ACCESS_TOKEN_EXPIRE_MINUTES: int = 300
    
    # 其他配置
    API_V1_STR: str = "/api/v1"
    PROJECT_NAME: str = "个人博客"

    class Config:
        case_sensitive = True

settings = Settings() 